
<%
var selected1 = "";
%>
<div class="bjui-pageContent">
  <form method="post" action="/product/save" enctype="multipart/form-data" class="pageForm" data-toggle="validate">

    <input type="hidden" id="id" name="id" value="${product.id!}">
    <input type="hidden" id="action" name="action" value="${action!}">
	  <input type="hidden" id="smallimage" name="smallimage" value="${product.smallimage!}">
	  <input type="hidden" id="maximage" name="maximage" value="${product.maximage!}">

	  <div class="pageFormContent" data-layout-h="0">

    		<table class="table table-condensed table-hover" width="100%">
				<tbody>


				<tr>
					<td>
						<label for="j_name" class="control-label x85">名称</label>
						<input type="text" name="name" id="j_name" value="${product.name!}" data-rule="" size="40">
		            </td>
		        </tr>

				<tr>
					<td>
						<label for="j_platformid" class="control-label x85">平台类型</label>
						<select id="j_platformid" name="platformid" data-toggle="selectpicker" data-width="200">
							<%
							selected1 = "";
							for(obj in platformList!)
							{
							if(isEmpty(product.platformid) || obj.id != product.platformid)
							{
							selected1="";
							}else{
							selected1 = "selected='selected'";
							}
							println("<option value='" + obj.id + "'"+selected1+">"+obj.name+"</option>");
							}
							%>
						</select>
					</td>
				</tr>


				<tr>
					<td>
						<label for="j_funcname" class="control-label x85">所属功能</label>
						<select id="j_funcname" name="funcnameid" data-toggle="selectpicker" data-width="400">
							<%
							selected1 = "";
							for(obj in funcnameList!)
							{
							if(isEmpty(product.funcnameid) || obj.id != product.funcnameid)
							{
							selected1="";
							}else{
							selected1 = "selected='selected'";
							}
							println("<option value='" + obj.id + "'"+selected1+">"+obj.name+"</option>");
							}
							%>
						</select>
					</td>
				</tr>

				<tr>
					<td>
						<label for="j_author" class="control-label x85">作者</label>
						<input type="text" name="author" id="j_author" value="${product.author!}" data-rule="" size="40">
					</td>
				</tr>

				<tr>
					<td>
						<label for="j_dataurl" class="control-label x85">Git地址</label>
						<input type="text" name="dataurl" id="j_dataurl" value="${product.dataurl!}" data-rule="" size="40">
					</td>
				</tr>

				<!--<tr>-->
					<!--<td>-->
						<!--<label for="j_firstkey" class="control-label x85">文件Key</label>-->
						<!--<input type="text" name="firstkey" id="j_firstkey" value="${product.firstkey!}" data-rule="" size="40">-->
					<!--</td>-->
				<!--</tr>-->


				<tr>
					<td>
						<label for="file1" class="control-label x85">产品小图</label>
						<input id="file1" type="file" name="file1" >
						<span>300*200</span>
						<!--<input type="text" name="smallimage" id="j_smallimage" value="${product.smallimage!}" data-rule="" size="20">-->
		            </td>
		        </tr>

				<%if(!isEmpty(product.id)){%>
				<tr>
					<td style="height: 100px;">
						<label  class="control-label x85">产品图片</label>
						<img src="/upload/${product.smallimage!}" style="width: 100px;height: 100px">
						<!--<input type="text" name="smallimage" id="j_smallimage" value="${product.smallimage!}" data-rule="" size="20">-->
					</td>
				</tr>
				<%}%>

				<!--<tr>-->
					<!--<td>-->
						<!--<label for="file2" class="control-label x85">产品大图</label>-->
						<!--<input id="file2" type="file" name="file2" >-->
						<!--<span>600*400</span>-->
						<!--&lt;!&ndash;<input type="text" name="maximage" id="j_maximage" value="${product.maximage!}" data-rule="" size="20">&ndash;&gt;-->
		            <!--</td>-->
		        <!--</tr>-->

				<%if(!isEmpty(product.id)){%>
				<tr>
					<td style="height: 100px;">
						<label  class="control-label x85">大图预览</label>
						<img src="/upload/${product.maximage!}" style="width: 100px;height: 100px">
						<!--<input type="text" name="smallimage" id="j_smallimage" value="${product.smallimage!}" data-rule="" size="20">-->
					</td>
				</tr>
				<%}%>

				<tr>
					<td>
						<label for="j_descript" class="control-label x85">描述</label>
						<div style="display: inline-block; vertical-align: middle;">
							<textarea name="descript" id="j_descript" class="j-content" style="width: 720px;" data-toggle="kindeditor" data-minheight="400">${product.descript!}
							</textarea>
						</div>

						<!--<input type="text" name="descript" id="j_descript" value="${product.descript!}" data-rule="" size="20">-->
		            </td>
		        </tr>
				</tbody>
			</table>
		</div>


	</form>
</div>

<div class="bjui-pageFooter">
	<ul>
		<li><button type="button" class="btn-close" data-icon="close">取消</button></li>
		<li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
	</ul>
</div>
